//package tech.dx.springdb.config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import tech.dx.springdb.service.UserService;
//
///**
// * @ClassName SecureConfig
// * @Description TODO
// * @Author omg
// * @Date 2019/3/30 19:17
// * @Version 1.0
// */
////@EnableWebSecurity
//public class SecureConfig extends WebSecurityConfigurerAdapter {
//    @Autowired
//    private UserService userService;
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//       /// super.configure(http);
//        http.authorizeRequests()
//                .antMatchers("/").permitAll()
//                .antMatchers("/*").hasRole("admin");
//        http.formLogin();
//        http.logout();
//        http.rememberMe();
//
//    }
//
//    @Override
//    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
//        //userService.getUserByEmail();
//        auth.inMemoryAuthentication()
//                .withUser("admin").password("admin").roles("admin");
//        //auth.jdbcAuthentication();
//        //super.configure(auth);
//
//    }
//}
